<head>
	<link rel="stylesheet" href="assets/css/gallery-view.css">
</head>
<div class='c-box-600 c-box c-box-left' id='gallery-view'>
 <h3><?PHP echo $parent['name'];?> Photo Galleries</h3>
	<?PHP
	$ctr =1;
	foreach($galleryview->galleries as $x)
	{
		if($x['type']=='gallery')
		{
			$image_count = $galleryview->count_gallery_images($x['id']);
	
			?>

				<li>
						
					<a href='gallery/<?PHP echo $x["id"];?>/<?PHP echo csq($x["title"]);?>' class="">
						<img src="<?PHP echo ap($x['image']);?>" width="180" height="120" alt="<?PHP  echo $x['title'];?>">
						<span class='gallery-title'><?PHP  echo $x['title'];?></span>
						<br><span class='photo-count'> <?PHP  echo $image_count." photos";?></span>
					</a>

				</li>
			<?PHP
				}
				if($ctr%3==0) echo "<hr />";
		
		$ctr++;
	}

	?>
 
</div>
<div class='c-box-headline c-box-300 ad-med-300-250 c-box-right'>
        <?PHP

        global $conf;
        $ad_m = new ads();
        $ad_m->zone=5;
        $ad_m->category=$conf->qm[1];
        $ad_m->serve_image_ad();
        ?>

</div>
<div class='c-box c-box-300 c-box-right c-box-latest-videos' id='g-latest-videos'>
		<h3>What's New</h3>
		<?PHP
		$items=0;

		foreach($galleryview->items as $x)
		{

			if($items <= 2 && !empty($x['title']) && ($x['type']=='video'))
			{


				?>

					<li>

									<div class='c-box-latest-item-text-bida'><a href='play/<?PHP echo $x["id"];?>/<?PHP echo csq($x["title"]);?>' class="popoutplayer c-box-latest-link"><?PHP  echo $x['title']."<br />";?></a>
									</div>
							<div class='c-box-latest-item-image' style="background-image:url('<?PHP echo ap($x['thumb']);?>');">
								<a href='play/<?PHP echo $x["id"];?>/<?PHP echo csq($x["title"]);?>' class="popoutplayer">
									<img src="assets/images/play-mini.png" width="60" height="24" alt="Play Mini">
								</a>
							</div>





					</li>
				<?PHP
				$items++;
			}


		}

		?>
	
	</div>

